fixes #303 and #304 broken mac build stuff