fixing 2 of 5 bugs