Updated with bugfixes