Minor bug fixes / making it work