(1) is working as designed.(2) should work fine, so you're getting something wrong. Post the entire codemodule (or the relevant parts if it's too big).