Fixed issues with webstorm refactoring