Fix issues #11 & #12

Fix issues #11 & #12