fixed destroy nil error from controller