fix to -z logical checkings