Fixed errors causing warnings