Resolve bugs