resolve bugs created by previous commit