fixed a few issues with first commit