Fixed access rights
Migrated to py3k