fixed a bug; adjust layout