Fixing bug with method call on undefined