fixed fail safe calculations