some core fixes