[FIX] Fixed some issues related to the refactoring