fixed bug 2 from Travis, added bug 3