Solved couple of bugs