fixes dialog disappearing into the right of the viewport
better handling of attacking enemy