If you post your code, we can tell you what the problem is. If I understand what you are trying to do correctly, it should look a little like this:
Code:
if (pwm_val > (127 + deadband) || pwm_val < (127 - deadband))
{
relay = rev; // out of neutral condition
} else
{
relay = fwd; // in neutral condition
}