test case and fix for declare