#4 fixed the positions edit page throws 500

Fixed the positions edit page throws 500.
Add tests.
![zrzut ekranu z 2014-08-11 17 21 21](https://cloud.githubusercontent.com/assets/6718923/3878008/22f924d4-216b-11e4-9831-56b3aa9d4fa2.png)


thanks, it works :wink: