Optimize keys check and fix? for node-webkit

Ping #417