Fix for javascript invocation of object methods.