cleaning up issues #480 #479 and #478