Fix PHP bugs, thanks IntelliJ