Have rewritten size detection. Now it's can be setted by the user