Some core fixes