Fixes #3042, improving coding style