Fixes random template extends