Fix error caused by template loader returning a null reader
Removed useless import