Added up changes from @kimyu92