Set current directory before protecting using GUI
Fix interface implementation's generic parameter not being resolved

Fix #136