Options were being opened always on the top if the class "bottom" was added before.

Class "bottom" was not being removed after the options were closed.
Options were being opened always on the top if the class "bottom" was added before.