Fixed bug #1 and others undesired behaviors