fixed last occurences of bugs