a few fixes still buggy