Fixed some issues based om GitHub comments