Fixed several serious bugs