hmn, it might be that your keyboard cannot handle when several keys are being used all at once.
what other keys are you using when this is happening? my clue is when you said it works when you let go of the W key. might have something to do with key roll-over (hope my term is correct)
you might want to remap some keys