bugs fixed including a major refresh bug