[BUGFIX beta] use Object.keys when possible