Fix code misplaced on interface implementation