Corrected 2 small bugs