onBack problem

Hello all,

I still having problems with onBack()

function onBack() {
        if (ON_BACK == last_behavior) {
            System.exit();
        }
        last_behavior = ON_BACK;
        return false;
    }

When I press back button everytime exits app.  The first time too without launch system.exit

Any help will be welcome  Thanks