Fixed all mentioned errors

Thanks guys!