fix error in admin nav controller when trying to flush buffer when there was none

fix error in admin nav controller when trying to flush buffer when there was none