Latest fix on refactor