Fix bug + formatting