Fixed bug#9888 - Warning when using standard template.

-Tidied file.
Moved fix to the right position.