fixed issues #1 & #2