Rewrite part of fill bucket method, to fix client and server issues