Fixed conditional and future bug