fix bad condition with error and post pages