few fixes

Look at that code let me know what you think