Fix behaviour on Mac