Fixes #3587 . Fix access level and add defaultCode