Some fixes for Lion