fixing the bugs of the board engine :D:D:D:D:D:D