Fix for #5867

removing unecessary function