fixed .then promise