more than 1 if working at same time

i made movement script using if and elif, it works fine but when i go forward+left or right it will go only forward. how to fix it
heres the script

import bgecont = bge.logic.getCurrentController()
own = cont.owner

keyboard = bge.logic.keyboard

Forward = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.WKEY]
Backward = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.SKEY]
Left = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.AKEY]
Right = bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.DKEY]

if Forward:
own.applyMovement([-0.2,0,0],True)
elif Backward:
own.applyMovement([0.2,0,0],True)
elif Left:
own.applyMovement([0,-0.2,0],True)
elif Right:
own.applyMovement([0,0.2,0],True)

main()

Replace all your ‘elif’ statements with ‘if’ statements. That way each direction you press gets a chance to contribute to the movement.

thanks for quick help