Fixed legacy funnction still used in some case (... seriously)