Fix bugs due to refactoring
Fix php specs due to refactoring