perspective undefined/NaN error