bugfixing complete thanks to ozgur :)