Bug fixes to encounter form