Fix bug #4 & #5