Realize fix and refactor