Fixed linux/mac compatibility