Fix some issues made in last commit