Issue #504 remove unneccesary code