minor formatting / error check fixes...