Fixed minor internal issues