Fixis for MacOS compatibility
Fix problems