Fixed to use Q promise style