couple of bugs solved