fixed open/creat return value bug