[feature/api] Fixed some small bugs

Fixed a couple of code style mistakes and a couple of small bugs

PHPBB3-11595