fixes regarding promises