Hopefully fixed refactoring issue