Resolved obscure bugs