Add fixes by @Hikkyu