fixed an assert check and fixed assert_cond macro and added missing define guard