Fixed ticket 42 and ticket 33