error checking works, app page closes