Fix promise code

Signed-off-by: Markus Jura <markus.jura@gmail.com>