Fixing the path issue when loading template