Fixed mistakes @jacob1 pointed out