Fixed the 2 bugs