some more changes for compatibility, need to fix only 1 error