fixed a few things suggested by JW