Fix misc issues