Fix and clean. references #2504