Update Code and Bug Fix