Fix #4 and Fix #5