Made code less broken