added workaround for optimizer bug in V8