Fixed some issues