Bugfix for angular promise support