Fix #2501 & another -related bug