fixes applied to 5.0.6