cleanup of methods (also fixes #531)