More bug fixes along the same lines