Fixes for issue#24 and issue#29

![image](https://cloud.githubusercontent.com/assets/6339380/5238043/06e31b2e-78e6-11e4-8e2b-14b326db05dd.png)
![image](https://cloud.githubusercontent.com/assets/6339380/5238044/09c5826e-78e6-11e4-8765-5e45c242f545.png)
![image](https://cloud.githubusercontent.com/assets/6339380/5238046/0e73acb4-78e6-11e4-9dea-89ebb15b5e36.png)
![image](https://cloud.githubusercontent.com/assets/6339380/5238047/12aa027e-78e6-11e4-85dd-f8988afdb1c3.png)