Better fix for open()