fixed an issue with withInFuture