fix bug and some styling issues