Fix #184. Use appendAlternate instead of setAlternate
remove space and adjust coding standard