fixes to improve compatibility