fixed compatibility with OS X 10.7