fixed crash when trying to define default

and cleanup