Fixed issue #39 and IE bugs..