Fixed errors calling assoc
Fixed loops using empty?