Fix axis flip issues