pre merging shenil's fix