fixed a bug in engine

Signed-off-by: Nicholas Lum <nicholaslum444@hotmail.com>
Merge branch 'develop' of https://github.com/cs2103aug2014-t16-3j/main into develop