Fixed 2 of 3 bugs