Add fixes by ShadowNinja review