no compile error, however key is still null when calling derive